from tkinter import *

root = Tk()
# 字体系列，大小，类型
label_font = ('times', 20, 'bold')
widget = Label(root, text="配置组件外观")
widget.config(bg='black', fg='yellow')
widget.config(font=label_font)
widget.config(height=3, width=20)
widget.pack(expand=YES, fill=BOTH)
root.mainloop()
